import request from '@/utils/request'
/**
 * (WipRfid)表实体类
 *
 * @author makejava
 * @since 2025-01-10 20:29:12
 */

export const entityPut={
    id: null,  //ID
    partNo: null,  //零件编号
    standardQuantity: null,  //标准数量
    tagCode: null,  //标签编号
    productSerialNo: null,  //产品流转号
    materialNo: null,  //材料炉号
    registrationTime: null,  //挂接时间
    position: null,  //当前位置
    processNo: null,  //当前工序号
    processName: null,  //当前工序名称
    processType: null,  //当前工序类型
    receipts: null,  //领用总数
    quantity: null,  //合格品数量
    unQuantity: null,  //不良品数量
    inspectionBatch: null,  //检验批次
    boxNo: null,  //所属箱号
    wipTraceTaskId: null,  //任务ID
    wipPlanSalesId: null,  //计划ID
    wipStorageId: null,  //箱包ID
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
}
export const entityPo={
    id: null,  //ID
    partNo: null,  //零件编号
    standardQuantity: null,  //标准数量
    tagCode: null,  //标签编号
    productSerialNo: null,  //产品流转号
    materialNo: null,  //材料炉号
    registrationTime: null,  //挂接时间
    position: null,  //当前位置
    processNo: null,  //当前工序号
    processName: null,  //当前工序名称
    processType: null,  //当前工序类型
    receipts: null,  //领用总数
    quantity: null,  //合格品数量
    unQuantity: null,  //不良品数量
    inspectionBatch: null,  //检验批次
    boxNo: null,  //所属箱号
    wipTraceTaskId: null,  //任务ID
    wipPlanSalesId: null,  //计划ID
    wipStorageId: null,  //箱包ID
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
}
export const tableList =[
    {
        type: "selection",
        prop: "id",
        header_align: "left",
        align: "left",
        fixed: "left",
        width: 40,
        min_width: 40,
        sortable: true,
        resizable: true,
        show_overflow_tooltip: true,
        show: true
    },
    {
        type: "default",
        label: "零件编号",
        prop: "partNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "标准数量",
        prop: "standardQuantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "标签编号",
        prop: "tagCode",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "产品流转号",
        prop: "productSerialNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "材料炉号",
        prop: "materialNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "挂接时间",
        prop: "registrationTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "当前位置",
        prop: "position",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "当前工序号",
        prop: "processNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "当前工序名称",
        prop: "processName",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "当前工序类型",
        prop: "processType",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "领用总数",
        prop: "receipts",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "合格品数量",
        prop: "quantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "不良品数量",
        prop: "unQuantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "检验批次",
        prop: "inspectionBatch",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "所属箱号",
        prop: "boxNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "任务ID",
        prop: "wipTraceTaskId",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "计划ID",
        prop: "wipPlanSalesId",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "箱包ID",
        prop: "wipStorageId",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建时间",
        prop: "createTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建人",
        prop: "createBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新时间",
        prop: "updateTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新人",
        prop: "updateBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
]
export const editList =[
    {
        show: false,
        type: "hidden",
        label: "id",
        key: "id",
        span: 24
    },
    {
        show: true,
        type: "Input",
        label: "零件编号",
        key: "partNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "标准数量",
        key: "standardQuantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "标签编号",
        key: "tagCode",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "产品流转号",
        key: "productSerialNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "材料炉号",
        key: "materialNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "挂接时间",
        key: "registrationTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "当前位置",
        key: "position",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "当前工序号",
        key: "processNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "当前工序名称",
        key: "processName",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "当前工序类型",
        key: "processType",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "领用总数",
        key: "receipts",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "合格品数量",
        key: "quantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "不良品数量",
        key: "unQuantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "检验批次",
        key: "inspectionBatch",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "所属箱号",
        key: "boxNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "任务ID",
        key: "wipTraceTaskId",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "计划ID",
        key: "wipPlanSalesId",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "箱包ID",
        key: "wipStorageId",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "创建时间",
        key: "createTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "创建人",
        key: "createBy",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "更新时间",
        key: "updateTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "更新人",
        key: "updateBy",
        span: 12,
        data:{}
    },
]
export const PageMix={
    records:[],
    total: 0,
    size: 6,
    current: 1,
    orderItem: "update_time",
    ascending: false,
    queryEntity: {
        id: null,  //ID
        partNo: null,  //零件编号
        standardQuantity: null,  //标准数量
        tagCode: null,  //标签编号
        productSerialNo: null,  //产品流转号
        materialNo: null,  //材料炉号
        registrationTime: null,  //挂接时间
        position: null,  //当前位置
        processNo: null,  //当前工序号
        processName: null,  //当前工序名称
        processType: null,  //当前工序类型
        receipts: null,  //领用总数
        quantity: null,  //合格品数量
        unQuantity: null,  //不良品数量
        inspectionBatch: null,  //检验批次
        boxNo: null,  //所属箱号
        wipTraceTaskId: null,  //任务ID
        wipPlanSalesId: null,  //计划ID
        wipStorageId: null,  //箱包ID
        delFlag: null,  //逻辑删除标记
        createTime: null,  //创建时间
        createBy: null,  //创建人
        updateTime: null,  //更新时间
        updateBy: null,  //更新人
    },
    queryJSON: {
        id: "id",  //ID
        partNo: "partNo",  //零件编号
        standardQuantity: "standardQuantity",  //标准数量
        tagCode: "tagCode",  //标签编号
        productSerialNo: "productSerialNo",  //产品流转号
        materialNo: "materialNo",  //材料炉号
        registrationTime: "registrationTime",  //挂接时间
        position: "position",  //当前位置
        processNo: "processNo",  //当前工序号
        processName: "processName",  //当前工序名称
        processType: "processType",  //当前工序类型
        receipts: "receipts",  //领用总数
        quantity: "quantity",  //合格品数量
        unQuantity: "unQuantity",  //不良品数量
        inspectionBatch: "inspectionBatch",  //检验批次
        boxNo: "boxNo",  //所属箱号
        wipTraceTaskId: "wipTraceTaskId",  //任务ID
        wipPlanSalesId: "wipPlanSalesId",  //计划ID
        wipStorageId: "wipStorageId",  //箱包ID
        delFlag: "delFlag",  //逻辑删除标记
        createTime: "createTime",  //创建时间
        createBy: "createBy",  //创建人
        updateTime: "updateTime",  //更新时间
        updateBy: "updateBy",  //更新人
    },
    likeSomeWord: null,
    betweenItem: "updateTime",
    betweenStart: null,
    betweenEnd: null
}

export function list() {
    return request({
        url: "/wip/wipRfid",
        method: 'get'
    })
}
export function getById(id) {
    return request({
        url: "/wip/wipRfid/" + id,
        method: 'get'
    })
}
export function findList(entityQuery) {
    return request({
        url: "/wip/wipRfid/findList",
        method: 'post',
        data: entityQuery
    })
}
export function findOne(entityQuery) {
    return request({
        url: "/wip/wipRfid/findOne",
        method: 'post',
        data: entityQuery
    })
}
export function pageMix(pageMix) {
    return request({
        url: "/wip/wipRfid/pageMix",
        method: 'post',
        data: pageMix
    })
}
export function pageMixJoin(pageMix) {
    return request({
        url: "/wip/wipRfid/pageMixJoin",
        method: 'post',
        data: pageMix
    })
}
export function insert(entityPut) {
    entityPut.id=null;
    return request({
        url: "/wip/wipRfid",
        method: 'put',
        data: entityPut
    })
}
export function update(entityPut) {
    return request({
        url: "/wip/wipRfid/update",
        method: 'put',
        data: entityPut
    })
}
export function del(ids) {
    return request({
        url: "/wip/wipRfid/" + ids,
        method: 'delete'
    })
}
export function deleteDeep(ids) {
    return request({
        url: "/wip/wipRfid/deep/" + ids,
        method: 'delete'
    })
}

export function release(entityPut) {
    return request({
        url: "/wip/wipRfid/release",
        method: 'put',
        data: entityPut
    })
}
export function unifiedRelease(ids,inspectionBatch) {
    return request({
        url: "/wip/wipRfid/unifiedRelease/" + ids,
        method: 'put',
        params: {
            "inspectionBatch":inspectionBatch
        }
    })
}

export function doPack(ids,customer) {
    return request({
        url: "/wip/wipRfid/doPack/" + ids,
        method: 'put',
        params: {
            "customer":customer
        }
    })
}
